import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
@Entity("sys_oss")
export class SysOss {
  @PrimaryGeneratedColumn({ type: "bigint", name:'oss_id' })
  ossId: string;

  @Column("varchar", {
    name: "tenant_id",
    nullable: true,
    comment: "租户编号",
    length: 20,
    default: () => "'000000'",
  })
  tenantId: string | null;

  @Column("varchar", { name: "file_name", comment: "文件名", length: 255 })
  fileName: string;

  @Column("varchar", { name: "original_name", comment: "原名", length: 255 })
  originalName: string;

  @Column("varchar", { name: "file_suffix", comment: "文件后缀名", length: 10 })
  fileSuffix: string;

  @Column("varchar", { name: "url", comment: "URL地址", length: 500 })
  url: string;

  @Column("bigint", {
    name: "create_dept",
    nullable: true,
    comment: "创建部门",
  })
  createDept: string | null;

  @Column("datetime", {
    name: "create_time",
    nullable: true,
    comment: "创建时间",
  })
  createTime: Date | null;

  @Column("bigint", { name: "create_by", nullable: true, comment: "上传人" })
  createBy: string | null;

  @Column("datetime", {
    name: "update_time",
    nullable: true,
    comment: "更新时间",
  })
  updateTime: Date | null;

  @Column("bigint", { name: "update_by", nullable: true, comment: "更新人" })
  updateBy: string | null;

  @Column("varchar", {
    name: "service",
    comment: "服务商",
    length: 20,
    default: () => "'minio'",
  })
  service: string;

}